function myInstance(left: any, right: any) {
    let proto = Object.getPrototypeOf(left)
    let prototype = right.prototype

    while(proto) {
        if(proto === prototype) {
            return true
        } else {
            proto = Object.getPrototypeOf(proto)
        }
    }
    return false
}

console.log(myInstance([], Array))

export {}